/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.util.HashMap;

/**
 *
 * @author pyin
 */
public class NotificationManager {
    private static HashMap notifications = new HashMap();

    public static void addNotification(String cmd,String msg){
        notifications.put(cmd, msg);
    }

    public static void consume(String cmd){
        System.out.println(cmd);
        notifications.remove(cmd);
    }

    public static String[] getAllNotifications(){
        return (String[])notifications.values().toArray(new String[notifications.size()]);
    }

    public static String[] getAllCommands(){
        return (String[])notifications.keySet().toArray(new String[notifications.size()]);
    }

    public static String getNotification(String cmd){
        return (String)notifications.get(cmd);
    }

    public static int getNoficationCount(){
        return notifications.size();
    }

}
